package javas.net.rmi.client;

import java.rmi.RemoteException;

import javas.net.rmi.BaseService;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;


public class ClientRmi {

	public static void main(String[] args) {
		String url = "rmi://localhost/BaseService";
		try {
			Context namingContext = new InitialContext();
			BaseService servie = (BaseService)namingContext.lookup(url);
			System.out.println(servie.getClassName());
		} catch (NamingException e) {
			e.printStackTrace();
		} catch (RemoteException e) {
			e.printStackTrace();
		}

	}

}
